package com.cmc.cloud.cmclink.doc.convert;

import com.cmc.cloud.cmclink.doc.dto.DgProhibitedItemUpdateDto;
import com.cmc.cloud.cmclink.doc.entity.DgCommodityPsnDO;
import com.cmc.cloud.cmclink.doc.entity.DgProhibitedItemDO;
import com.cmc.cloud.cmclink.doc.vo.special.dgcommoditypsnvo.DgCommodityPsnRespVO;
import com.cmc.cloud.cmclink.doc.vo.special.dgprohibiteditemvo.DgProhibitedItemBaseVO;
import com.cmc.cloud.cmclink.doc.vo.special.dgprohibiteditemvo.DgProhibitedItemRespVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 危险品禁接清单明细 Convert
 *
 * @author 集运管理员
 */
@Mapper
public interface DgProhibitedItemConvert {

    DgProhibitedItemConvert INSTANCE = Mappers.getMapper(DgProhibitedItemConvert.class);

    /**
     * 属性转换 convert
     *
     * @param list
     * @return
     */
    List<DgProhibitedItemRespVO> convertVOList(List<DgProhibitedItemDO> list);

    /**
     * 属性转换 convert
     *
     * @param list
     * @return
     */
    List<DgCommodityPsnRespVO> convertPsnVOList(List<DgCommodityPsnDO> list);

    /**
     * 属性转换 convert
     *
     * @param list
     * @return
     */
    @Mapping(target = "id", ignore = true)
    List<DgProhibitedItemDO> convertUpdateList(List<DgProhibitedItemUpdateDto> list);

    /**
     * 属性转换 convert
     *
     * @param list
     * @return
     */
    List<DgProhibitedItemDO> convertList(List<DgProhibitedItemBaseVO> list);
}
